﻿<%@ Control Language="C#" AutoEventWireup="true" Inherits="System.Web.Mvc.ViewUserControl<Veteran_cms.Models.HomeAdminListViewModel>" %>
<%@ Import Namespace="THS.HtmlHelpers" %>
<div class="widget">
    <div class="title">
        <span class="titleIcon"><input type="checkbox" id="titleCheck" name="titleCheck" /></span><h6>Danh sách Menu chính</h6>
        <div style="float:right"><a href="<%=Url.Action("Create","ManageMenu") %>" title="" class="button greyishB" style="margin: 5px;"><img src="../../images/adminSite/icons/light/create.png" alt="" class="icon" /><span>THÊM MỚI</span></a></div>
    </div>
    <table cellpadding="0" cellspacing="0" width="100%" class="sTable withCheck mTable" id="checkAll">
        <thead>
            <tr>
                <td><img src="../../images/adminSite/icons/tableArrows.png" alt="" /></td>
               
                <td style="width:25%" class="sortCol">Dịch vụ <span></span></td>
                <td style="width:50%" class="sortCol"><div>Ngày tạo<span></span></div></td>
                  <td style="width:50%" class="sortCol"><div>Người tạo<span></span></div></td>
                <td>Chức năng</td>
            </tr>
        </thead>
        <tfoot>
            <tr>
                <td colspan="6">
                    <div class="tPagination">
                       <%if (Model != null)
                         {%>
                           <%=Ajax.Pager(Model.MenuInfo.CurrentPage, Model.MenuInfo.TotalItems, "MenuList", 0, Model.MenuInfo.ItemsPerPage, "Paging")%>
                       <%} %>
                    </div>
                </td>
            </tr>
        </tfoot>
        <tbody>
        <%if (Model.MenuList != null)
          {
              foreach (var item in Model.MenuList)
              {%>
            <tr>
                <td><input type="checkbox" id="titleCheck2" name="checkRow" /></td>
                <td><a href="<%=Url.Action("Details", "ManageMenu", new {id = item.menu_id}) %>" title=""><%=item.name %></a></td>
                <td><%=item.created_date.ToString("dd/MM/yyyy")%></td>
                <td><%=item.user_name %></td>
                <td class="actBtns">
                    <a href="<%=Url.Action("Details", "ManageMenu", new {id = item.menu_id}) %>" title="Cập nhật" class="tipS"><img src="../../images/adminSite/icons/dark/pencil.png" alt="" /></a>
                    <a href="<%=Url.Action("Delete", "ManageMenu", new {id = item.menu_id}) %>" title="Xóa" class="tipS"><img src="../../images/adminSite/icons/uploader/deleteFile.png" alt="" onclick="return ConfirmDelete()" /></a>
                </td>
            </tr>
            <%}
          } %>
        </tbody>
    </table>
</div>